/**
 * Project Name:emm-website
 * File Name:FCProcessController.java
 * Package Name:com.emm.yixun.website.controller.workflow.process
 * Date:2017年6月28日下午6:58:17
 * Copyright (c) 2017, chenzhou1025@126.com All Rights Reserved.
 *
*/

package com.emm.yixun.website.controller.workflow.process;

import javax.servlet.http.HttpServletRequest;


import org.activiti.engine.RepositoryService;
import org.activiti.engine.repository.ProcessDefinition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * ClassName:FCProcessController <br/>
 * Reason:	丰策流程设置 <br/>
 * Date:     2017年6月28日 下午6:58:17 <br/>
 * @author   Administrator
 * @version  
 * @since    JDK 1.6
 * @see 	 
 */
@Controller
@RequestMapping("/FC/backstage/workflow/process/")
public class FCProcessController {

    @Autowired
    private RepositoryService repositoryService;
    
    @RequestMapping(value = "toNodeList")
    public String toNodeList(String processDefinitionId,String projectId,ModelMap map,HttpServletRequest request){
    	map.put("processDefinitionId", processDefinitionId);
    	map.put("projectId", projectId);
    	ProcessDefinition processDefinition=repositoryService.getProcessDefinition(processDefinitionId);
    	map.put("processDefinitionName", processDefinition.getName());
    	return "/system/workflow/process/FC_nodeList";
    }
}